import apiUrl from '../base'
import axios from '@/libs/axios'

const dataDictionary = {
  //类型列表
  getDictTypeList(data) {
    return axios.request({
      url: `${apiUrl.base}v1/DictType/list`,
      data,
      method: 'post'
    })
  },
  //字典列表
  getDictList(data) {
    return axios.request({
      url: `${apiUrl.base}v1/Dict/list`,
      data,
      method: 'post'
    })
  },
  //新增
  getDictAdd(data) {
    return axios.request({
      url: `${apiUrl.base}v1/Dict/add`,
      data,
      method: 'post'
    })
  },
  //编辑
  getDictEditor(data) {
    return axios.request({
      url: `${apiUrl.base}v1/Dict/edit`,
      data,
      method: 'put',
    })
  },
  //详情
  getDetail(data) {
    return axios.request({
      url: `${apiUrl.base}v1/Dict/detail/` + data,
      method: 'get'
    })
  },
  //删除
  getDictDelete(data) {
    return axios.request({
      url: `${apiUrl.base}v1/Dict/batchDelete`,
      data,
      method: 'delete',
    })
  }
}
export default dataDictionary
